<!---Hooks: if a component is being called see if their are any scripts that need to be called before the footer loads.--->
<cfif len(trim(c)) GT 0>
	<cfif fileexists('#request.adminpath#components/#c#/chooks/onfooterload.cfm')>
    	<cfinclude template="#request.absoluteadminpath#components/#c#/chooks/onfooterload.cfm">
    </cfif>
</cfif>
<cfif NOT fileexists('#request.adminpath#includes/onfooterload.cfm') OR isdefined('url.init')>
	<cfif qcs.recordcount GT 1>
		<cfset includesfile = "">
        <cffile action="write" file="#request.adminpath#includes/onfooterload.cfm" output="#includesfile#">
		<cfloop query="qcs">
			<cfif fileexists('#request.adminpath#components/#qcs.name#/hooks/onfooterload.cfm')>
      			<cfset thisline = '<cfinclude template="#request.absoluteadminpath#components/#qcs.name#/hooks/onfooterload.cfm">'>
				<cffile action="append" file="#request.adminpath#includes/onfooterload.cfm" output="#thisline#" addnewline="yes">
    		</cfif>
		</cfloop>
	</cfif>
</cfif>
<cfinclude template="#request.absoluteadminpath#includes/onfooterload.cfm">
<cfif fileexists('#request.adminpath#includes/hooks/onfooterload.cfm')>
	<cfinclude template="#request.absoluteadminpath#includes/hooks/onfooterload.cfm">
</cfif>
<cfif NOT cgi.SCRIPT_NAME CONTAINS '/dialogs' AND NOT cgi.SCRIPT_NAME CONTAINS '/cfcs'> <!---does not load the footer if this script is located in a "/dialogs" folder--->
<cfif fileexists('#request.adminpath#themes/#request.site_theme#/layouts/#request.layout#/footer.cfm')>
	<cfinclude template="#request.absoluteadminpath#themes/#request.site_theme#/layouts/#request.layout#/footer.cfm">
</cfif>
<cfif len(trim(request.layoutinclude))>
	<cfif fileexists('#request.adminpath#themes/#request.site_theme#/layouts/#request.layoutinclude#/include_footer.cfm')>
		<cfinclude template="#request.absoluteadminpath#themes/#request.site_theme#/layouts/#request.layoutinclude#/include_footer.cfm">
	</cfif>
</cfif>
</cfif>
</body>
<!---Hooks:  loads any scripts after the body is loaded.  Scripts included in this file should be those that will run outside of the closing body tag.--->
<cfif len(trim(c)) GT 0>
	<cfif fileexists('#request.adminpath#components/#c#/chooks/onpageload.cfm')>
    	<cfinclude template="#request.absoluteadminpath#components/#c#/chooks/onpageload.cfm">
    </cfif>
</cfif>
<cfif NOT fileexists('#request.adminpath#includes/onpageload.cfm') OR isdefined('url.init')>
	<cfif qcs.recordcount GT 1>
		<cfset includesfile = "">
        <cffile action="write" file="#request.adminpath#includes/onpageload.cfm" output="#includesfile#">
		<cfloop query="qcs">
			<cfif fileexists('#request.adminpath#components/#qcs.name#/hooks/onpageload.cfm')>
      			<cfset thisline = '<cfinclude template="#request.absoluteadminpath#components/#qcs.name#/hooks/onpageload.cfm">'>
				<cffile action="append" file="#request.adminpath#includes/onpageload.cfm" output="#thisline#" addnewline="yes">
    		</cfif>
		</cfloop>
	</cfif>
</cfif>
<cfinclude template="#request.absoluteadminpath#includes/onpageload.cfm">
<cfif fileexists('#request.adminpath#includes/hooks/onpageload.cfm')>
	<cfinclude template="#request.absoluteadminpath#includes/hooks/onpageload.cfm">
</cfif>
</html>